<template>
  <div>
    <el-card>
      <el-descriptions title="设备详情">
        <el-descriptions-item label="uuid">{{ deviceDetail.uuid }}</el-descriptions-item>
        <el-descriptions-item label="剩余次数">{{ deviceDetail.use_count }}</el-descriptions-item>
        <el-descriptions-item label="ip地址">{{ deviceDetail.ip_info }}</el-descriptions-item>
        <el-descriptions-item label="创建时间">
          <el-tag size="small">{{ deviceDetail.create_time }}</el-tag>
        </el-descriptions-item>
        <el-descriptions-item label="设备信息">{{ deviceDetail.platform }}</el-descriptions-item>
      </el-descriptions>
    </el-card>

  </div>
</template>

<script>
import {deviceApi} from "@/api/device.js"

export default {
  name: "info",
  data() {
    return {
      deviceObj: '',
      deviceDetail: ''
    }
  },
  mounted() {
    this.deviceObj = this.$route.query
    this.getDeviceInfo()
  },
  methods: {
    getDeviceInfo() {
      let {uuid} = this.deviceObj
      deviceApi.getDeviceDetail({uuid}).then(res => {
        debugger
        this.deviceDetail = res.data
      })
    }
  }
}
</script>

<style scoped>

</style>
